package week8;

import java.awt.Point;
import java.util.Arrays;

public class toStringDemo {
    public static void main(String[] args){
        int[] Numbers = {1, 2, 3};
        Point p = new Point(1, 2);
        //String s1 = ""+Numbers;//运行结果：[I@74a14482
        String s1 = Arrays.toString(Numbers);//运行结果：[1, 2, 3]
        String s2 = ""+p;//运行结果：java.awt.Point[x=1,y=2]
        System.out.println(s1);
        System.out.println(s2);
    }
}
